package com.ra.brand;

import java.io.File;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Transient;

/**
 * 品牌公寓-推广楼/房源
 * 
 * @author colin
 * 
 */
@Entity
public class BrandPromotehouse {
	
	// 推广楼
	public static final int HOUSE_TYPE_BUILDING = 0;
	
	// 推广房源
	public static final int HOUSE_TYPE_ROOM = 1;

	private Integer id;

	// 楼房图片路径
	private String houseFileName;

	// Transient
	private File house;

	// Transient
	private String houseContentType;

	// 房屋类型：0楼房 1房间
	private Integer houseType;

	// 楼房或房间id
	private Integer houseId;
	
	// 楼房或房间name
	private String houseName;
	
	private BrandApartment brandApartment;

	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}

	public String getHouseName() {
		return houseName;
	}

	public void setHouseName(String houseName) {
		this.houseName = houseName;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Transient
	public File getHouse() {
		return house;
	}

	public void setHouse(File house) {
		this.house = house;
	}

	@Transient
	public String getHouseContentType() {
		return houseContentType;
	}

	public void setHouseContentType(String houseContentType) {
		this.houseContentType = houseContentType;
	}

	public String getHouseFileName() {
		return houseFileName;
	}

	public void setHouseFileName(String houseFileName) {
		this.houseFileName = houseFileName;
	}

	public Integer getHouseType() {
		return houseType;
	}

	public void setHouseType(Integer houseType) {
		this.houseType = houseType;
	}

	public Integer getHouseId() {
		return houseId;
	}

	public void setHouseId(Integer houseId) {
		this.houseId = houseId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	public BrandApartment getBrandApartment() {
		return brandApartment;
	}

	public void setBrandApartment(BrandApartment brandApartment) {
		this.brandApartment = brandApartment;
	}

}
